package com.sise.stuteaintersys.mapper;

import com.sise.stuteaintersys.bean.entity.ExamResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName ExamResultMapper
 * @Description
 * @Date 2019/1/17 22:01
 * @Version 1.0
 **/
public interface ExamResultMapper {
    int insertSelective(ExamResult examResult);
    @Select("select * from exam_result where course_id=#{courseId} and student_id =#{studentId}  and exam_type=#{examType}")
    ExamResult select(@Param("courseId") Integer courseId, @Param("studentId") Integer studentId, @Param("examType") String examType);
    @Select("select * from exam_result where course_id=#{courseId} order by student_id ASC")
    List<ExamResult> selectExam(Integer courseId);
}
